import { motion } from 'framer-motion';

export function LoadingScreen() {
  return (
    <div className="min-h-screen bg-gradient-to-br from-slate-900 via-blue-900 to-slate-900 flex items-center justify-center">
      <div className="text-center">
        {/* Logo animation */}
        <motion.div
          initial={{ scale: 0.8, opacity: 0 }}
          animate={{ scale: 1, opacity: 1 }}
          transition={{ duration: 0.8, ease: "easeOut" }}
          className="mb-8"
        >
          <div className="relative mx-auto w-24 h-24 mb-6">
            {/* Animated rings */}
            <motion.div
              animate={{ rotate: 360 }}
              transition={{ duration: 3, repeat: Infinity, ease: "linear" }}
              className="absolute inset-0 border-4 border-quantum-blue border-t-transparent rounded-full"
            />
            <motion.div
              animate={{ rotate: -360 }}
              transition={{ duration: 2, repeat: Infinity, ease: "linear" }}
              className="absolute inset-2 border-4 border-crypto-green border-t-transparent rounded-full"
            />
            <motion.div
              animate={{ rotate: 360 }}
              transition={{ duration: 4, repeat: Infinity, ease: "linear" }}
              className="absolute inset-4 border-4 border-proof-purple border-t-transparent rounded-full"
            />
            
            {/* Center logo */}
            <div className="absolute inset-6 bg-gradient-to-br from-quantum-blue to-proof-purple rounded-full flex items-center justify-center">
              <span className="text-white font-bold text-lg">ZK</span>
            </div>
          </div>
          
          <h1 className="text-4xl font-bold gradient-text mb-2">
            零知识证明演示
          </h1>
          <p className="text-gray-300 text-lg">
            Zero-Knowledge Proof Visualization
          </p>
        </motion.div>
        
        {/* Loading animation */}
        <motion.div
          initial={{ opacity: 0, y: 20 }}
          animate={{ opacity: 1, y: 0 }}
          transition={{ delay: 0.5, duration: 0.6 }}
          className="mb-8"
        >
          <div className="flex items-center justify-center space-x-2 mb-4">
            <div className="loading-dots">
              <span></span>
              <span></span>
              <span></span>
            </div>
          </div>
          <p className="text-gray-400">正在初始化系统...</p>
        </motion.div>
        
        {/* Feature highlights */}
        <motion.div
          initial={{ opacity: 0, y: 20 }}
          animate={{ opacity: 1, y: 0 }}
          transition={{ delay: 1, duration: 0.6 }}
          className="grid grid-cols-1 md:grid-cols-3 gap-6 max-w-2xl mx-auto"
        >
          <div className="text-center p-4">
            <div className="w-12 h-12 mx-auto mb-3 bg-quantum-blue/20 rounded-lg flex items-center justify-center">
              <span className="text-quantum-blue text-xl">🔐</span>
            </div>
            <h3 className="font-semibold text-white mb-1">隐私保护</h3>
            <p className="text-gray-400 text-sm">完全保护您的秘密数据</p>
          </div>
          
          <div className="text-center p-4">
            <div className="w-12 h-12 mx-auto mb-3 bg-crypto-green/20 rounded-lg flex items-center justify-center">
              <span className="text-crypto-green text-xl">⚡</span>
            </div>
            <h3 className="font-semibold text-white mb-1">高效验证</h3>
            <p className="text-gray-400 text-sm">快速的数学证明验证</p>
          </div>
          
          <div className="text-center p-4">
            <div className="w-12 h-12 mx-auto mb-3 bg-proof-purple/20 rounded-lg flex items-center justify-center">
              <span className="text-proof-purple text-xl">🎯</span>
            </div>
            <h3 className="font-semibold text-white mb-1">交互体验</h3>
            <p className="text-gray-400 text-sm">直观的可视化演示</p>
          </div>
        </motion.div>
        
        {/* Progress indicator */}
        <motion.div
          initial={{ opacity: 0 }}
          animate={{ opacity: 1 }}
          transition={{ delay: 1.5, duration: 0.6 }}
          className="mt-12"
        >
          <div className="w-64 h-2 mx-auto bg-gray-700 rounded-full overflow-hidden">
            <motion.div
              initial={{ width: 0 }}
              animate={{ width: "100%" }}
              transition={{ duration: 2, ease: "easeInOut" }}
              className="h-full bg-gradient-to-r from-quantum-blue via-crypto-green to-proof-purple"
            />
          </div>
        </motion.div>
      </div>
    </div>
  );
}